/**
*  Copyright 2002 Sun Microsystems, Inc. All rights reserved.
*/

/**
 *Title MyCircle
 * @author xiaofei
 *@version 1.0
 */
package mypoint;
public class MyCircle {	
	private MyPoint center;
	private int radius;
	public MyCircle(int x, int y, int radius)
	{
		this.center = new MyPoint(x, y);
		this.radius = radius;
	}	
	public MyCircle(MyPoint center, int radius)
	{
		this.center = center;
		this.radius = radius;
	}
	public void setCenter(int x, int y)
	{
		this.center = new MyPoint(x, y);
	}
	public void setRadius(int radius)
	{
		this.radius = radius;
	}
	public MyPoint getCenter()
	{
		return this.center;
	}
	public int getRadius()
	{
		return this.radius;
	}
	public String toString()
	{
		return "Circle @(" + center.getX() + "," + center.getY() + ") radius = " + radius;
	}
	public double getArea()
	{
		return radius * radius * Math.PI;
	}
}
